package com.bgs.pojo;

import com.bgs.utils.dateUtils;

import java.util.Date;
import java.util.List;

public class Exam {
    private Integer pkId;

    private String name;

    private String sex;

    private Date birthday;

    private String deleteFlag;

    private Date createTime;

    private Date updateTime;

    private Integer age;

    private List<ExamB> eB;

    @Override
    public String toString() {
        return "Exam{" +
                "pkId=" + pkId +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", deleteFlag='" + deleteFlag + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", age=" + age +
                ", eB=" + eB +
                '}';
    }

    public List<ExamB> geteB() {
        return eB;
    }

    public void seteB(List<ExamB> eB) {
        this.eB = eB;
    }

    public Integer getAge() {

        Integer age1 = 0;

        try {
            age1 = dateUtils.getAge(birthday);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return age1;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getPkId() {
        return pkId;
    }

    public void setPkId(Integer pkId) {
        this.pkId = pkId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}